@import '../../styles/variables.scss';

.chat-list-page {
  .page-header {
    @include flex-between;
    margin-bottom: $spacing-lg;

    .header-left {
      h1 {
        font-size: $font-size-xxl;
        color: $text-color;
        margin-bottom: $spacing-xs;
      }
      p {
        font-size: $font-size-base;
        color: $text-color-secondary;
        margin: 0;
      }
    }
  }

  .filter-card {
    margin-bottom: $spacing-lg;
  }

  .rooms-card {
    .ant-card-body {
      padding: $spacing-lg;
    }
    
    .room-card {
      height: 100%;
      display: flex;
      flex-direction: column;
      border-radius: $border-radius-lg;
      border: 2px solid $border-color;
      transition: all 0.3s ease;
      
      &:hover {
        border-color: $primary-color;
        box-shadow: $box-shadow-lg;
        transform: translateY(-4px);
      }
      
      .ant-card-body {
        padding: $spacing-lg;
        display: flex;
        flex-direction: column;
        height: 100%;
      }
      
      .room-header {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: $spacing-md;
        
        .room-icon {
          display: flex;
          justify-content: center;
          align-items: center;
          width: 80px;
          height: 80px;
          background: linear-gradient(135deg, rgba($primary-color, 0.1) 0%, rgba($primary-color, 0.05) 100%);
          border-radius: 50%;
          
          .ant-badge {
            display: flex;
            justify-content: center;
            align-items: center;
          }
        }
      }
      
      .room-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        
        .room-name {
          font-size: $font-size-lg;
          font-weight: 600;
          color: $text-color;
          margin: 0 0 $spacing-md 0;
          text-align: center;
          overflow: hidden;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          line-height: 1.4;
          min-height: 2.8em;
        }
        
        .room-tags {
          display: flex;
          justify-content: center;
          flex-wrap: wrap;
          gap: $spacing-xs;
          margin-bottom: $spacing-md;
          
          .ant-tag {
            margin: 0;
            border-radius: $border-radius-sm;
            font-size: $font-size-sm;
            padding: 2px 8px;
          }
        }
        
        .room-description {
          font-size: $font-size-sm;
          color: $text-color-secondary;
          text-align: center;
          margin-bottom: $spacing-md;
          flex: 1;
          overflow: hidden;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          line-height: 1.5;
        }
        
        .room-footer {
          display: flex;
          justify-content: space-between;
          align-items: center;
          padding-top: $spacing-md;
          border-top: 1px solid $border-color;
          font-size: $font-size-sm;
          
          .online-count,
          .unread-count {
            display: flex;
            align-items: center;
            gap: $spacing-xs;
            color: $text-color-secondary;
            
            .anticon {
              color: $primary-color;
            }
          }
          
          .unread-count {
            color: $error-color;
            font-weight: 600;
            
            .anticon {
              color: $error-color;
            }
          }
        }
      }
    }
  }
}
